//
//  RecTableViewCell.m
//  AoJi
//
//  Created by MinwenYi on 15-3-2.
//  Copyright (c) 2015年 xuanheng. All rights reserved.
//

#import "RecTableViewCell.h"

@implementation RecTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundColor=[UIColor clearColor];
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        [self otherconfig];
        
        
    }

    return self;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)otherconfig
{
//    @property(nonatomic,strong)UILabel *ctitle;
//    @property(nonatomic,strong)UILabel *etitle;
//    @property(nonatomic,strong)UILabel *typel;
//    @property(nonatomic,strong)UILabel *cityel;
//    @property(nonatomic,strong)UILabel *moreImg;
//    @property(nonatomic,strong)UIView *bgview;
    
    self.bgview=[[UIView alloc]initWithFrame:CGRectMake(11/2, 13, Mainwidth-11, 66)];
    self.bgview.backgroundColor=[UIColor whiteColor];
    self.bgview.layer.cornerRadius=3;
    self.bgview.clipsToBounds=YES;
    [self addSubview:self.bgview];
    
    self.ctitle=[[UILabel alloc]initWithFrame:CGRectMake(12, 15, 332/2-12, 20)];
    self.ctitle.font=[UIFont systemFontOfSize:13];
    self.ctitle.textAlignment=NSTextAlignmentLeft;
    self.ctitle.textColor=[self getCorlor:@"565656"];
    [self.bgview addSubview:self.ctitle];
    
    self.etitle=[[UILabel alloc]initWithFrame:CGRectMake(12, viewBottom(_ctitle), 332/2-12, 20)];
    _etitle.font=[UIFont systemFontOfSize:12];
    self.etitle.textAlignment=NSTextAlignmentLeft;
    self.etitle.textColor=[self getCorlor:@"b2b2b2"];
    [self.bgview addSubview:self.etitle];
//
    self.typel=[[UILabel alloc]initWithFrame:CGRectMake(viewRight(self.ctitle), 24, 60, 20)];
    self.typel.font=[UIFont systemFontOfSize:14];
    self.typel.textAlignment=NSTextAlignmentCenter;
    self.typel.textColor=[self getCorlor:@"47b3fe"];
    [self.bgview addSubview:self.typel];
//
//    
    self.cityel=[[UILabel alloc]initWithFrame:CGRectMake(viewLeft(self.typel)+87/2+5, 24, 60, 20)];
    self.cityel.font=[UIFont systemFontOfSize:14];
    self.cityel.textAlignment=NSTextAlignmentCenter;
    self.cityel.textColor=[self getCorlor:@"f56c47"];
    [self.bgview addSubview:self.cityel];
    
    
    self.moreImg=[[UIImageView alloc]initWithFrame:CGRectMake(viewRight(self.bgview)-25/2-33/2, viewTop(self.cityel), 33/2, 33/2)];
    self.moreImg.image=[UIImage imageNamed:@"gengduo@2x.png"];
    [self.bgview addSubview:self.moreImg];

    
}

-(void)setParamdic:(NSMutableDictionary *)paramdic
{

    if (self.paramdic!=paramdic)
    {
        _paramdic=paramdic;
        
        self.ctitle.text=[self.paramdic objectForKey:@"cschool"];
        self.etitle.text=[self.paramdic objectForKey:@"eschool"];
        self.typel.text=[self.paramdic objectForKey:@"type"];
        self.cityel.text=[self.paramdic objectForKey:@"city"];
       
        
    }
}
@end
